import request from '@/utils/request'

// 查询机构列表
export function listAgency(query) {
  return request({
    url: '/agency/getListPage',
    method: 'get',
    params: query
  })
}

// 新增机构
export function addAgency(data) {
  return request({
    url: '/agency',
    method: 'post',
    data: data
  })
}

// 查询机构权限配置详细
export function getAgencyMenu(data) {
  return request({
    url: '/agency/'+data,
    method: 'get',
  })
}

// 修改机构
export function updateAgency(data) {
  return request({
    url: '/agency',
    method: 'put',
    data: data
  })
}


// 删除机构
export function delAgency(data) {
  return request({
    url: '/agency',
    method: 'delete',
    data:data
  })
}

//获取所有机构
export function listAgencyAll(){
  return request({
    url: '/agency/getAll',
    method: 'get'
  })
}